<!DOCTYPE html>
<html>
<#include "../../common/header.ftl">
<script src="${basePath}/js/groupGoodsScene/list.js?v=201711021700"></script>

<head>
<meta charset="UTF-8">
<title>组货场景管理</title>
<style>
	.left{
		float:left;
		min-width:100px;
		margin-left: 10px;
	}
	.table-margin{
		margin:5px 3%;
		width:92%;
	}
</style>

</head>
<body>
   
<div class="container" style="margin-left:5%;width:90%">
	<form class="layui-form left" action="#" >
		<div class="layui-form-item ">
		 <#if permission?? && (permission.P1603??)>
		     <button type="button" class="layui-btn layui-btn-normal" id="addTopic-button">新增组货场景</button>
		 </#if>
		</div>
	</form>
</div>
<table class="table table-margin">
  <thead>
      <tr>
         <th>一级场景</th>
         <th>二级场景</th>
         <th>上级场景</th>
         <th>操作</th>
      </tr>
  </thead>
  <tbody>
	<#list sceneList! as scene>
		<tr class="grade-1">
			<td>${scene.name!}</td>
			<td></td>
			<td></td>
			<td>
				<div class="btn-group ">
				  <button type="button" class="btn btn-primary dropdown-toggle " data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
				    	操作<span class="caret"></span>
				  </button>
				  <ul class="dropdown-menu">
				   <#if permission?? && (permission.P1604??)>
				    <li><a href="#" onclick="editFun('${scene.sceneId}')">修改</a></li>
				   </#if>
 					<#if permission?? && (permission.P1606??)>
				    <#if scene.childrenList?? && (scene.childrenList?size==0)>
				    	<li><a href="#" onclick="deleteFun('${scene.sceneId}')">删除</a></li>
				    </#if>
 					</#if>
				  </ul>
				</div>
			</td>
		</tr>
		<#list scene.childrenList! as secondScene>
		<tr class="grade-2">
			<td></td>
			<td>${secondScene.name!}</td>
			<td>${scene.name!}</td>
			<td>
				<div class="btn-group ">
				  <button type="button" class="btn btn-primary dropdown-toggle " data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
				    	操作<span class="caret"></span>
				  </button>
				  <ul class="dropdown-menu">
				   <#if permission?? && (permission.P1604??)>
					    <li><a href="#" onclick="editFun('${secondScene.sceneId}')">修改</a></li>
				   </#if>
				    <#if permission?? && (permission.P1606??)>
					    <li><a href="#" onclick="deleteFun('${secondScene.sceneId}')">删除</a></li>
				    </#if>
				  </ul>
				</div>
			</td>
		</tr>
		<tr></tr>
		<tr></tr>
		<tr></tr>
		</#list>
	</#list>
  </tbody>
</table>
</body>
<script type="text/javascript">
	var basePath="${basePath}";
	var init={
	}
	$(function(){
		layui.use(['form', 'layer'] , function(){
		  var layer = layui.layer;
		  var form = layui.form(); 
	});
});
</script>
</html>